package com.kylin.dal.entity.payment;


import com.kylin.shared.common.entity.BaseEntry;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 订单支付数据项
 * @author Damon S.
 * @version v1.0.1
 * @date 2019年11月01日 10:57
 */
@Entity
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_payment", catalog = "db_kylin_artwork")
public final class PaymentEntry extends BaseEntry implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column private Long id;

    @Column(name = "order_no")
    private String orderNo;

    @Column(name = "payment_no")
    private String paymentNo;

    @Column(name = "pay_type", columnDefinition = "SMALLINT")
    private Integer payType;

    @Column private Integer channel;
    @Column private Long amount;

    @Column(name = "committed_at")
    private Long committedAt;

    @Column(name = "paid_at")
    private Long paidAt;

    @Column(name = "created_at")
    private Long createdAt;

    @Column(name = "updated_at")
    private Long updatedAt;
}
